{include file='header.tpl'}

{if $action == 'confirm'}
    {if $errors|@count == 0}
        <p>你的新密码已经被激活。</p>

        <ul>
            <li><a href="/account/login">登录</a></li>
        </ul>
    {else}
        <p>点击链接后发送新密码到邮箱。<a href="/account/fetchpassword">获取密码</a></p>
    {/if}
{elseif $action == 'complete'}
    <p>邮件已发送，其中包括用户名和新的密码，点击其中的链接可以激活密码。</p>
{else}
    <form method="post" action="/account/fetchpassword">
        <fieldset>
            <legend>获得密码</legend>

            <div class="row" id="form_username_container">
                <label for="form_username">用户名：</label>
                <span><input class="inbox" type="text" 
                id="form_username" name="username" /></span>
                {include file='lib/error.tpl' error=$errors.username}
            </div>
            <div>
                <input class="submit" type="submit" name="submit" value="提交"/>
            </div>
        </fieldset>
    </form>
{/if}

{include file='footer.tpl'}